﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace GraphicsEngineNamespace
{
    /// <summary>
    /// Struktura opisująca wieszchołki i ich właściwości.
    /// </summary>
    public struct VertexMultitextured
    {
        public Vector3 position;
        public Vector3 normal;
        public Vector2 textureCoordinate;
        public Vector4 texWeights;
        public Vector3 tangent;

        public static int sizeInBytes = (3 + 3 + 2 + 4 + 3) * sizeof(float);
        public static VertexElement[] vertexElements = new VertexElement[]
        {
            new VertexElement( 0, 0, VertexElementFormat.Vector3, VertexElementMethod.Default, 
                VertexElementUsage.Position, 0 ),
            new VertexElement( 0, sizeof(float) * 3, VertexElementFormat.Vector3, 
                VertexElementMethod.Default, VertexElementUsage.Normal, 0 ),
            new VertexElement( 0, sizeof(float) * 6, VertexElementFormat.Vector4, 
                VertexElementMethod.Default, VertexElementUsage.TextureCoordinate, 0 ),
            new VertexElement( 0, sizeof(float) * 8, VertexElementFormat.Vector4, 
                VertexElementMethod.Default, VertexElementUsage.TextureCoordinate, 1 ),
        };
    }
}